<%
Function DameNombreDoc(url)
	Dim Temp
	Temp = Right(url, Len(url) - InStrRev(url, "/"))
	DameNombreDoc = Temp
End Function

Function DameExt(nombre)
	Dim Temp
	Temp = Right(nombre, Len(nombre) - InStrRev(nombre, "."))
	DameExt = Temp
End Function

Function DameIcono(ext)
	Dim Temp
	Select Case ext
		Case "doc"
			Temp = "doc.gif"
		Case "xls"
			Temp = "xls.gif"
		Case "pps"
			Temp = "pps.gif"
		Case "mdb"
			Temp = "mdb.gif"
		Case "pdf"
			Temp = "pdf.gif"
		Case "jpg"
			Temp = "jpg.gif"
		Case "gif"
			Temp = "gif.gif"
		Case "bmp"
			Temp = "bmp.gif"
		Case "txt"
			Temp = "txt.gif"
		Case "zip"
			Temp = "zip.gif"
		Case "rar"
			Temp = "rar.gif"
		Case Else
			Temp = "none.gif"
	End Select
	DameIcono = Temp
End Function

Function TieneDocAdjuntos(id)
	Dim Temp
	Temp = False
	'Response.Write(id)
	Conectar_gae
		SQL = "SELECT Nombre FROM ArchivosAdjuntos WHERE Id_Pase = " & id
		Set Tabla = Conexion.Execute(SQL)
		If Not Tabla.EOF Then Temp = True
		Tabla.Close
	Desconectar
	TieneDocAdjuntos = Temp
End Function
%>